package quantum2.graph;

import quantum2.math.Complex;

public final class Graph {

    public static final int V_A = 0;
    public static final int V_B = 1;
    public static final int V_S = 2;

    public static final int E_AS = 0;
    public static final int E_BS = 1;

    private final Number edge0;
    private final Number edge1;

    public Graph(Number edge0, Number edge1) {
        this.edge0 = edge0;
        this.edge1 = edge1;
    }

    public Number getEdgeLength(int edge) {
        return edge == E_AS ? edge0 : edge1;
    }

    public int getEdgeNum() {
        return 2;
    }

    public void firstPhotons(int edge, boolean forward, Schedule schedule) {
        Complex amp = Complex.number(1);
        schedule.schedule(getEdgeLength(edge).doubleValue() / 2.0, amp, edge, forward);
    }
}
